<%@page contentType="text/html; charset=utf-8"%>
<script language="javascript">
	var formErrorIndex=0;
	var formErrorMsg="";
	var formErrorObjId="";
	function setFormErrorMsg(msg,index,objId){
		if(formErrorIndex==0 || formErrorIndex>index){
			if(msg!=null && msg!=""){
				formErrorIndex=index;
				formErrorMsg=msg;
				formErrorObjId=objId;
			}
		}
	}
	function showFormErrorMsg(){
		if(formErrorIndex!=0){
			document.getElementById("errorMsgTr").style.display="";
			document.getElementById("errorMsgDiv").innerHTML=formErrorMsg;
			if(formErrorObjId!=null && formErrorObjId!=""){
				document.getElementById(formErrorObjId).focus();
			}
		}
	}
	function goNextInput(objId){
		var obj=null;
		if(objId!=null && objId!=''){
			obj=document.getElementById(objId);
		}
		if(window.event.keyCode==13){
			if(obj!=null){
				obj.focus();
			}else if(window.doSave){
				doSave();
			}
		}
	}
</script>
<c:if test="${pageTopTitle!=null && pageTopTitle!=''}"><h3>${pageTopTitle}</h3></c:if>
<table width="96%" border="0" cellpadding="0" cellspacing="0" align="center">
	<tr id="errorMsgTr" <c:if test="${alertMsg==null || alertMsg==''}">style="display:none"</c:if>>
	  <td colspan="2">
	  	<div class="msg-error" id="errorMsgDiv">
      	<c:if test="${alertMsg!=null && alertMsg!=''}">
      		${alertMsg}
      		<c:remove var="alertMsg" scope="session" />
      	</c:if>
      	</div>
	  </td>
	</tr>
</table>